package com.yuan.SMS.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.yuan.SMS.bean.User;
import com.yuan.SMS.dao.UserDao;

@RestController
public class TestController {
	@Autowired
	UserDao userDao;
    //@CrossOrigin
	
    @RequestMapping("/test")
    public String test(){
    	User user = userDao.getUser("123456", "123456");
        return user.getUsername();
    }
}
